#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>
int val = 100;
int main()
{
  pid_t id = fork();
  if(id==0)
  {
    sleep(1);
    val+=5;
    printf("child:pid %d val=%d addr=%p\n",getpid(),val,&val);
  }
  else
  {
    sleep(1);
    printf("father:pid %d val=%d addr=%p\n",getpid(),val,&val);
  }
  return 0;
}
